package com.cheetah.start.common.plugin.log;

import cn.hutool.core.util.StrUtil;
import lombok.extern.slf4j.Slf4j;

import java.util.regex.Pattern;

@Slf4j
public class ConsoleSqlLog extends com.p6spy.engine.spy.appender.StdoutLogger {

    public ConsoleSqlLog() {
    }

    @Override
    public void logText(String text) {
        if (StrUtil.isNotBlank(text)) {
            if (log.isDebugEnabled()) {
                log.debug(text);
            } else if (log.isInfoEnabled()) {
                log.info(text);
            }
        }
    }
}
